<div id="toolbar-box">
		<div class="toolbar" id="toolbar">
			<table class="toolbar">
                             <tr>
                                
				<td class="button" id="toolbar-publish">
				<a href="#" onclick="setpublish('pub');" class="toolbar">
				<span class="icon-32-publish" title="Publish">
				</span>
				Активувати
				</a>
				</td>

				<td class="button" id="toolbar-unpublish">
				<a href="#" onclick="setpublish('unpub');" class="toolbar">
				<span class="icon-32-unpublish" title="Unpublish">
				</span>
				Деактивувати
				</a>
				</td>
                                
				<td class="button" id="toolbar-trash">
				<a href="#" onclick="delet('razdel');" class="toolbar">
				<span class="icon-32-trash" title="Trash">
				</span>
				Видалити
				</a>
				</td>
                               
                            </tr>
                        </table>
		</div>
		<div class="clear"></div>
</div>
<div class="clear"></div>
	<div style="padding-left:20px;"><?php //echo $obj->link; ?></div>
<div id="element-box">
			<div class="m">
				<form action="" method="post" name="adminForm" id="adminForm">
				<table class="adminlist">
					<thead>
						<tr>
							<th width="20px">#</th>
                                                        <th width="1%" nowrap="nowrap">ID</th>
							<th width="15px" align="left">
								<input type="checkbox" id="toggle" name="toggle" value="" onclick="CheckAll();" />
							</th>
							<th class="title">Адреса</th>
                                                        <th class="title" width="20px">Нерух.</th>
                                                        <th class="title" width="20px">Тип нерух.</th>
                                                        <th width="5%" nowrap="nowrap">Актиність</th>
							<th width="5%">Редагувати</th>
                                                        <th width="5%">Видалити</th>
                                                        
						</tr>
					</thead>
					<tbody>
						<!-- CONTENT -->
						<?php
                                                if ($this->items) {
                                                        $i=1;
                                                     foreach ($this->items as $item):
                                                ?>
                                                   <tr class="row<?php echo $i; ?>" id='row<?php echo $item->getId(); ?>'>
							<td><?php echo $i; ?></td>
                                                        <td nowrap="nowrap" align="center" width="50px">
                                                            <?php echo $item->getId(); ?>
                                                        </td>
							<td width="15px" align="left">
								<input type="checkbox" id="checkme<?php echo $i; ?>" value="<?php echo $item->getId(); ?>"/></td>
							<td nowrap="nowrap">
							<span class="editlinktip hasTip" title="Кликните для просмотра внутренних страниц::<?php echo $value['title']; ?>">
                                                        <a href="<?php echo "/admin/housing_".$item->getId(); ?>.html"><?php echo $this->areas[$item->getAreas()]->getName(); ?> район, станція метро <?php //echo $this->metro[$item->getAreas()]->getName(); ?></a></span>
							</td>
                                                        <td nowrap="nowrap" align="center" width="50px">
                                                            <?php if($item->getCategory()==1){ ?>
                                                                <img src="/public/images/icons/dom.png" border="0" alt="Дім" width="32px" height="32px"/>
                                                            <?php }else{ ?>
                                                                <img src="/public/images/icons/kvartira.png" border="0" alt="Квартира" width="32px" height="32px"/>
                                                            <?php } ?>
                                                        </td>
                                                        <td nowrap="nowrap" align="center" width="50px">
                                                            <?php echo $this->typehousing->Check($item->getCategory(), $item->getPropertyType()); ?>
                                                        </td>

                                                        <td align="center">
								<?php if($item->getPublished()==1){ ?>
								<span style='cursor:pointer;' id='pub<?php echo $item->getId();?>' onclick="actions(<?php echo $item->getId();?>,'pub');" title="Активувати">
								<img src="/public/images/admin/tick.png" border="0" alt="Деактивовано" /></span>
								<?php }else{ ?>
								<span style='cursor:pointer;' id='unpub<?php echo $item->getId();?>' onclick="actions(<?php echo $item->getId();?>,'unpub');" title="Деактивувати">
								<img src="/public/images/admin/publish_x.png" border="0" alt="Автивовано" /></span>
								<?php } ?>
							</td>


							<td>
								<a style='padding-left:5px;' href="/admin/moderation_<?php echo $item->getId();?>.html"><img src="/public/images/admin/toolbar/edit.png" border="0" width="32px" height="30px"></a>
							</td>

							<td>
								<span style='padding-left:5px;cursor:pointer;' id='del<?php //echo $value['id'];?>' onclick="actions(<?php //echo $value['id'];?>,'del');"><img src="/public/images/admin/toolbar/delete.png"  border="0" width="32px" height="30px"></span>
							</td>
                                                        
						</tr>
						<?php
                                                $i++;
                                                endforeach;
                                                 } ?>
						<!-- END CONTENT -->
					</tbody>
					</table>
				</form>
				<div class="clear"></div>
			</div>
</div>
<div id="result"></div>